from typing import List
class Solution:
    def countPartitions(self, nums: List[int]) -> int:
        sum_ = sum(nums)
        acc = 0
        ans = 0
        for i in range(len(nums)-1):
            acc+=nums[i]
            ans+=((sum_-acc*2)&1==0)
        return ans